<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <h2>函数默认值</h2>
</body>
<script>
    function getUserInfo(name = '匿名', age = 0, address = '无名') {

        console.log(name)
        console.log(age)
        console.log(address)
    }

    getUserInfo('张三', 22, '郑州')
</script>

</html>